#include "Object3D.h"

Object3D::Object3D()
{
	scale = Vector3(1.0f,1.0f,1.0f);
	effectId = effect_id::SHADER3D;
	isSolid = true;
	isDisplayed = true;
	castShadow = false;
	receiveShadow = false;
};

Object3D::~Object3D()
{
};

Matrix* Object3D::GetTransform(char arryOption[3])
{
	transformMatrix.Reset();

	transformMatrix.Translate(position.x, position.y, position.z);
	for(int i=0;i<3;i++)
	{
		switch (arryOption[i])
		{
		case 0 :
			transformMatrix.RotateX(rotation.x);
			break;
		case 1 :
			transformMatrix.RotateY(rotation.y);
			break;
		case 2 :
			transformMatrix.RotateZ(rotation.z);    
			break;
		default :        
			break;
		}
	}
	transformMatrix.Scale(scale.x, scale.y, scale.z);

	return &transformMatrix;
};
